package com.qidian.server;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

import com.qidian.common.Globals;

public class MServerListener implements ServletContextListener
{   
//	private static ExecutorService exec = Executors.newCachedThreadPool();//线程池

	//关闭tomcat前关闭线程 
	public void contextDestroyed(ServletContextEvent arg0) {   
//		exec.shutdown() ;
		Globals.uninit() ;
		System.out.println("Server stoped!");
	}
	
	//开启tomcat前执行线程
	@Override
	public void contextInitialized(ServletContextEvent sce) {
		System.out.println("Start server");
	}
}
